<ion-header class="mine-work-header">
  <ion-navbar hideBackButton="true">
    <ion-buttons start navPop class="back-buttons">
      <button ion-button clear></button>
    </ion-buttons>

    <ion-title float-left>工作信息</ion-title>
  </ion-navbar>
</ion-header>

<ion-content class="mine-work-section">

  <div class="work-title">为保证借款申请顺利通过,请务必填写真实信息</div>
  <ion-list>
    <form #workInfoRef="ngForm">
      <ion-item>
        <div>单位名称</div>
        <input [(ngModel)]="workInfo.companyName"
               type="text"
               name="company-name"
               #workInfoRef="ngModel"
               placeholder="请填写单位名称"
               required
        />
      </ion-item>

      <ion-item>
        <div>单位电话</div>
        <input type="text"
               [(ngModel)]="workInfo.companyPhone"
               name="company-telephone"
               #workInfoRef="ngModel"
               placeholder="请填写单位电话"
               required
        />
      </ion-item>

      <a ion-item (click)="choiceAddress()">
        <div>单位所在地</div>
        <p *ngIf="address">{{address}}</p>
        <p *ngIf="!address">请选择单位所在地</p>
      </a>
      <ion-item>
        <input class="add-margin-left"
               [(ngModel)]="detailAddress"
               type="text"
               #workInfoRef="ngModel"
               name="detailAddress"
               placeholder="请填写具体街道门牌号"
               required
        />
      </ion-item>
    </form>
      <a ion-item (click)="executeSelectImage()">
        <div>工作照片</div>
        <h3>{{workInfo.workingImg.length<=0?'(选填,可提高通过率)':'已上传'}}</h3>
      </a>
      <a ion-item class="arrows-right">
        <ion-label>工作时长</ion-label>
        <ion-multi-picker id="workSeniority"
                          [(ngModel)]="initWork"
                          item-content
                          placeholder="(选填)"
                          cancelText="取消"
                          doneText="确定"
                          required
                          [multiPickerColumns]="workSeniority"
        ></ion-multi-picker>
      </a>
  </ion-list>

  <bank-encryption-footer></bank-encryption-footer>
</ion-content>

<ion-footer class="mine-work-footer">
  <button ion-button
          full
          [disabled]="!(workInfoRef.valid&&workInfo.workingImg.length>0)"
          (click)="executeSave()"
          color="default"
  >保存</button>
</ion-footer>
